﻿create or replace function selectPosterminal(
	out refcursor, inout xml
	)
as
$$
	declare
		ref alias for $1;
		xmlQueryData alias for $2;
	begin
		open ref for
			select posterminal2xml(poal.idposterminal, poal.serialnumber, poal.inventorynumber, null, null, null)
				from posterminal poal;
		return;
	end;
$$ language plpgsql	stable;